<?php

use yii\helpers\Html;
use yak\layui\widgets\form\ActiveForm;

/* @var $this yii\web\View */
/* @var $model yak\layui\models\rbac\AuthItem */
/* @var $form yak\layui\widgets\form\ActiveForm */
/* @var $ajaxOptions array */

?>

<div class="roles-form form-block">

    <?php $form = ActiveForm::begin(['ajaxOptions' => $ajaxOptions]); ?>

    <?= $form->field($model, 'type', ['template' => '{input}'])->hiddenInput()->label(false) ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true, 'lay-verify' => 'required']) ?>

    <?= $form->field($model, 'description')->textInput(['maxlength' => true, 'lay-verify' => 'required']) ?>

    <?= $form->field($model, 'rule_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'data')->textarea(['rows' => 6]) ?>

    <div class="layui-form-item layui-input-block">
        <?= Html::submitButton('立即提交', [
            "class" => "layui-btn", "lay-submit" => true, "lay-filter" => "_SUBMIT_FORM"
        ]) ?>
        <?= Html::resetButton('重置', [
            "class" => "layui-btn layui-btn-primary"
        ]) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>

